package system

import (
	v1 "server/handler/v1"
	"server/middleware"

	"github.com/gin-gonic/gin"
)

func RegisterMenuRoutes(group *gin.RouterGroup) {
	menuGroup := group.Group("/menu")
	handlerApp := v1.NewHandlerApp()
	menuGroup.Use(middleware.AuthorizationMiddleware())
	{
		menuGroup.POST("/create", handlerApp.MenuHandler.CreateMenuInfoHandler)
		menuGroup.DELETE("/delete/:id", handlerApp.MenuHandler.DeleteMenuInfoHandler)
		menuGroup.PUT("/modify", handlerApp.MenuHandler.ModifyMenuInfoHandler)
		menuGroup.GET("/info/:id", handlerApp.MenuHandler.GetMenuInfoHandler)
		menuGroup.GET("/list", handlerApp.MenuHandler.GetMenuListHandler)
		menuGroup.GET("/page", handlerApp.MenuHandler.GetMenuPageHandler)
	}
}
